-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add bytes to string modifier for solana contracts #1040
add bytes to string modifier for solana contracts #1040
Conversation
c55d6ad
to
5773256
Compare
5773256
to
995ae85
Compare
pkg/codec/modifier_base.go
Outdated
case reflect.Array, reflect.Slice: | ||
return fmt.Errorf("%w: cannot set a field from an array or slice", types.ErrInvalidType) | ||
case reflect.Struct: | ||
case reflect.Map: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see this added! Should we add map support to the other helpers as well?
- SetValueFromPath
- ApplyValue
- RetypeToOffChain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I exported the helpers and added map support to both
cf5644c
to
9851a2d
Compare
pkg/codec/byte_string_modifier.go
Outdated
// call RetypeToOffChain first with empty itemType to set base types | ||
offChainType, _ := mod.RetypeToOffChain(reflect.TypeOf(&onChain{}), "") | ||
|
||
fmt.Println("offChainType:") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This stays?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is part of the example and should stay, yes.
Supports